<!-- Recherche -->
<h3>Recherche</h3>
<form role="form" method="get">
  <input type="hidden" id="action" name="action" value="recherche">

  <!-- recherche Générale  -->
  <p>
    <input type="text" class="form-control<?php if(isset($_GET['chaine']) && $_GET['chaine'] != "") echo " active"; ?>" id="chaine" name="chaine" placeholder="Recherche générale"
    <?php if(isset($_GET['chaine'])) echo "value='" . $_GET['chaine'] . "'"; ?>
    />
  </p>

  <!-- type input -->
  <p>
    <label for="type">Type de bière</label>
    <select id="type" name="type" class="form-control<?php if(isset($_GET['type']) && $_GET['type'] != "") echo " active"; ?>">
      <option value="">Indifférent</option>
<?php if(isset($types)) : foreach($types as $type): ?>
      <option value="<?php echo $type->get("no"); ?>"<?php if(isset($_GET['type']) && $_GET['type'] == $type->get("no")) echo " selected='selected'"; ?>><?php echo $type->get("type"); ?></option>
<?php endforeach; endif; ?>
    </select>
  </p>

  <!-- fermentation input -->
  <p>
    <label for="degre">Fermentation</label>
    <select id="degre" name="degre" class="form-control<?php if(isset($_GET['degre']) && $_GET['degre'] != "") echo " active"; ?>">
      <option value="">Indifférent</option>
<?php if(isset($degres)) : foreach($degres as $degre): ?>
      <option value="<?php echo $degre->get("no"); ?>"<?php if(isset($_GET['degre']) && $_GET['degre'] == $degre->get("no")) echo " selected='selected'"; ?>><?php echo $degre->get("degre"); ?></option>
<?php endforeach; endif; ?>
    </select>
  </p>

  <!-- pays input -->
  <p>
    <label for="pays">Pays</label>
    <select id="pays" name="pays" class="form-control<?php if(isset($_GET['pays']) && $_GET['pays'] != "") echo " active"; ?>">
      <option value="">Indifférent</option>
<?php if(isset($pays)) : foreach($pays as $unPays): ?>
      <option value="<?php echo $unPays->get("no"); ?>"<?php if(isset($_GET['pays']) && $_GET['pays'] == $unPays->get("no")) echo " selected='selected'"; ?>><?php echo $unPays->get("title"); ?></option>
<?php endforeach; endif; ?>
    </select>
  </p>

  <!-- nb par page input -->
  <p>
    <label for="nbParPage">Bières par page</label>
    <select id="nbParPage" name="nbParPage" class="form-control">
      <option value="30" <?php if(isset($_GET['nbParPage']) && $_GET['nbParPage'] == "30") echo "selected='selected'"; ?>>30</option>
      <option value="60" <?php if(isset($_GET['nbParPage']) && $_GET['nbParPage'] == "60") echo "selected='selected'"; ?>>60</option>
      <option value="90" <?php if(isset($_GET['nbParPage']) && $_GET['nbParPage'] == "90") echo "selected='selected'"; ?>>90</option>
      <option value="120" <?php if(isset($_GET['nbParPage']) && $_GET['nbParPage'] == "120") echo "selected='selected'"; ?>>120</option>
    </select>
  </p>

  <input type="submit" class="btn" value="Rechercher"/>

</form>
